package cn.zyy.hotel.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Orders {

  private Integer id; //订单id
  private String ordersNo; //订单号
  private Integer accountId; //用户id
  private Integer roomTypeId; //房型id
  private Integer roomId; //房间id
  private String reservationName; //预订人姓名
  private String idCard; //身份证号码
  private String phone; //电话
  private Integer status; //订单状态 1-待确认 2-已确认
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @JsonFormat(timezone = "Asia/Shanghai",pattern = "yyyy-MM-dd HH:mm:ss")
  private Date reserveDate; //预定时间
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  @JsonFormat(timezone = "Asia/Shanghai",pattern = "yyyy-MM-dd")
  private Date arriveDate; //入住时间
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  @JsonFormat(timezone = "Asia/Shanghai",pattern = "yyyy-MM-dd")
  private Date leaveDate; //离店时间
  private Double reservePrice; //预定房价
  private String remark; //备注

  //房间对象
  private Room room;
  //房型对象
  private RoomType roomType;

}
